package com.example.value_strings_demo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.Button;

import java.util.List;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button button = new Button(this);

        List<String> info = StringUtils.getSysInfo(this);

        Log.i("eyesee_list", info.toString());
    }

    /**一维数组转换成二维数组*/
    private String[][] getTwoDimensionalArray(String[] array){
        String[][] twoDimensionalArray = null;
        for (int i = 0;i<array.length;i++){
            String[] tempArray = array[i].split(",");
            if (twoDimensionalArray==null){
                twoDimensionalArray = new String[array.length][tempArray.length];
            }
            for (int j=0;j<tempArray.length;j++){
                twoDimensionalArray[i][j]=tempArray[j];
            }
        }
        return twoDimensionalArray;
    }
}
